package pers.sen.search.controller;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import pers.sen.search.entity.QueryPageBean;
import pers.sen.search.entity.Result;
import pers.sen.search.service.SearchService;

import java.util.Map;

/**
 * @author Jason
 * @version 1.0.0
 * @date 2020/11/24 20:11
 * @Description TODO
 */
@RestController
public class SearchController {
    @Autowired
    private SearchService searchService;

    @PostMapping("good/search")
    public Result findKeyWordByPage(@RequestBody QueryPageBean queryPageBean) throws Exception {

        System.out.println("queryPageBean = " + queryPageBean);
        return new Result(searchService.searchGoods(queryPageBean));
    }


}
